<?php
    $cms = $this->cms;
    $theme = isset( $cms['theme'] ) ? $cms['theme'] : 'css';
    $layout = ( isset( $cms['layout'] ) && $cms['layout'] === 'boxed' ) ? 'container' : 'container-fluid';
?>

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title><?= $template['title'] ?></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        
        <!-- reset-styles -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/html5reset-1.6.1.css">
        <!-- main style -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/style.css">
        <!-- bootstrap -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/bootstrap/<?= $theme ?>/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/bootstrap/<?= $theme ?>/bootstrap-theme.min.css">
        <!-- metis-menu -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/metismenu/css/jquery.metisMenu.css">
        <!-- modal -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/modal/css/bootstrap-modal-bs3patch.css">
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/modal/css/bootstrap-modal.css">
        <!-- font-awesome -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/font-awesome/css/font-awesome.min.css">
        <!-- pnotify -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/pnotify/css/pnotify.custom.min.css">
        <!-- time-picker -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/time-picker/css/bootstrap-timepicker.min.css">
        <!-- date-picker -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/datepicker/css/datepicker.css">
        <!-- date-time-picker -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/datetimepicker/css/bootstrap-datetimepicker.min.css">
        <!-- date-range-picker -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/daterangepicker/css/daterangepicker-bs3.css">
        <!-- chosen -->
        <!--<link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/chosen/css/chosen.css">-->
        <!-- image-select -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/chosen/css/ImageSelect.css">
        <!-- tags-input -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/tagsinput/css/bootstrap-tagsinput.css">
        <!-- file-upload -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/fileupload/css/bootstrap-fileupload.min.css">
        <!-- color-picker -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/colorpicker/css/bootstrap-colorpicker.min.css">
        <!-- switch -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/switch/css/bootstrap-switch.min.css">
        <!-- touch-spin -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/touchspin/css/jquery.bootstrap-touchspin.min.css">
        <!-- cleditor -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/cleditor/jquery.cleditor.css">
        <!-- spinner -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/spinner/css/bootstrap-spinner.css">
        <!-- plupload -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css">
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css">
        <!-- data-tables -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/datatables/media/css/jquery.dataTables.min.css">
        <!-- snippet -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/snippet/css/jquery.snippet.min.css">
        <!-- prettify -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>plugins/prettify/prettify.css">
        <!-- bootstrap-tabs -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/tabs.css">
        <!-- panels -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/panels.css">
        <!-- forms -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/forms.css">
        <!-- wizard -->
        <link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/wizard.css">
        
        <!-- jquery -->
        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script type="text/javascript" src="<?= base_url() ?>js/jquery-1.11.1.min.js"><\/script>');</script>
        <script type="text/javascript">var base_url = '<?= base_url() ?>';</script>
        
        <!-- jquery-ui -->
        <script type="text/javascript" src="<?= base_url() ?>js/jquery-ui-1.10.4.min.js"></script>
        <!-- bootsrap -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/bootstrap/js/bootstrap.min.js"></script>
        <!-- modernizr -->
        <script type="text/javascript" src="<?= base_url() ?>js/modernizr-2.8.1.min.js"></script>
        <!-- cms -->
        <script type="text/javascript" src="<?= base_url() ?>js/cms.js"></script>
        
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->

        <div id="container" class="<?= $layout ?>">
        <?php if(isset($template['partials']['navigation'])) echo $template['partials']['navigation']; ?>
        <?= $template['body'] ?>
        <?php if(isset($template['partials']['footer'])) echo $template['partials']['footer']; ?>
        </div>

        <!-- modal -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/modal/js/bootstrap-modalmanager.js"></script>
        <script type="text/javascript" src="<?= base_url() ?>plugins/modal/js/bootstrap-modal.js"></script>
        <!-- metis-menu -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/metismenu/js/jquery.metisMenu.js"></script>
        <!-- pnotify -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/pnotify/js/pnotify.custom.min.js"></script>
        <!-- ajax-form -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/ajaxform/js/jquery.form.min.js"></script>
        <!-- form-validation -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/validation/js/jquery.validate.min.js"></script>
        <!-- form-validation-additional -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/validation/js/additional-methods.min.js"></script>
        <!-- serialize-json -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/serializejson/js/jquery.serializejson.min.js"></script>
        <!-- bbq -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/bbq/js/jquery.ba-bbq.min.js"></script>
        <!-- form-wizard -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/formwizard/js/jquery.form.wizard.js"></script>
        <!-- data-tables -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/datatables/media/js/jquery.dataTables.min.js"></script>
        <!-- moment -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/daterangepicker/js/moment.min.js"></script>
        <!-- time-picker -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/time-picker/js/bootstrap-timepicker.min.js"></script>
        <!-- date-picker -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/datepicker/js/bootstrap-datepicker.js"></script>
        <!-- date-time-picker -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
        <!-- date-range-picker -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/daterangepicker/js/daterangepicker.js"></script>
        <!-- chosen with image -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/chosen/js/chosen.jquery.js"></script>
        <!-- image-select -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/chosen/js/ImageSelect.jquery.js"></script>
        <!-- tags-input -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/tagsinput/js/bootstrap-tagsinput.js"></script>
        <!-- file-upload -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/fileupload/js/bootstrap-fileupload.min.js"></script>
        <!-- color-picker -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/colorpicker/js/bootstrap-colorpicker.min.js"></script>
        <!-- switch -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/switch/js/bootstrap-switch.min.js"></script>
        <!-- touch-spin -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/touchspin/js/jquery.bootstrap-touchspin.min.js"></script>
        <!-- spinner -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/spinner/js/bootstrap-spinner.js"></script>
        <!-- plupload -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/plupload/js/plupload.full.min.js"></script>
        <script type="text/javascript" src="<?= base_url() ?>plugins/plupload/js/jquery.ui.plupload/jquery.ui.plupload.min.js"></script>
        <script type="text/javascript" src="<?= base_url() ?>plugins/plupload/js/jquery.plupload.queue/jquery.plupload.queue.min.js"></script>
        <!-- CKEditor -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/ckeditor/ckeditor.js"></script>
        <!-- CLEditor -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/cleditor/jquery.cleditor.min.js"></script>
        <!-- masked-input -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/maskedinput/js/jquery.maskedinput.min.js"></script>
        <!-- shuffle -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/shuffle/jquery.shuffle.min.js"></script>
        <script type="text/javascript" src="<?= base_url() ?>plugins/shuffle/jquery.shuffle.modernizr.min.js"></script>
        <!-- prettify -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/prettify/prettify.js"></script>
        <!-- snippet -->
        <script type="text/javascript" src="<?= base_url() ?>plugins/snippet/js/jquery.snippet.min.js"></script>
        <!-- google maps -->
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
        <script type="text/javascript" src="<?= base_url() ?>js/scripts/plot_location.js"></script>
        
    </body>
</html>